<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<jsp:include page="../../common/assets_header.jsp"/>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<html>
<head>

<script type="text/javascript">

function check() {
	document.getElementById('ok').disabled = 'disabled';
}

function backlist(){
	$("#sequenceFrom").attr("action","<%=request.getContextPath()%>/sys/sequence/list");
	$("#sequenceFrom").submit();
}
</script>
</head>
<body >
	<!-- content -->	
		<div class="page-content">
			<div class="page-header">
				<h1>
					<c:if test="${sysSequence.sysSequenceId==null }">新增单据</c:if>
						<c:if test="${sysSequence.sysSequenceId!=null }">编辑单据</c:if>
								<small>
									<i class="icon-double-angle-right"></i>
									
								</small>
							</h1>
							
					
			</div>
				<div class="row">
					<c:if test="${success}">
						<div class="alert alert-block alert-success">
									<button class="close" data-dismiss="alert"><i class="icon-remove"></i></button>
									<strong><spring:message code="success"></spring:message>!</strong> <spring:message code="save success"></spring:message>！
						</div>
					</c:if>
					
					<c:if test="${success==false}">
						<div class="alert alert-danger">
							<button type="button" class="close" data-dismiss="alert"><i class="icon-remove"></i></button>
							<strong>
								<i class="icon-remove"></i>
								<strong><spring:message code="failure"></spring:message>!</strong> ${message}
							</strong>
						</div>
					</c:if>
					<div class="col-xs-12">
						<form action="<c:if test="${sysSequence.sysSequenceId==null}">add</c:if>
				  		  <c:if test="${sysSequence.sysSequenceId!=null}">edit</c:if>" method="post" class="form-horizontal" id="sequenceFrom"
						onsubmit="return check();">
						<input type="hidden" name="searchValue" value="${searchValue}" />
						<input type="hidden" name="id" value="${sysSequence.sysSequenceId}"></input> 
						<input type="hidden" name="token" value="${token}"></input>

						

						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right" for="form-field-1">序列编码：</label>
							<div class="controls">

								<input type="text" maxlength="200" name="seqCode"
									value="${sysSequence.seqCode}" class="m-wrap" required />
								<span class="help-inline"></span>

							</div>

						</div>

						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right" for="form-field-1">对象名称：</label>
							<div class="controls">

								<input type="text" maxlength="200" name=objectName
									value="${sysSequence.objectName}" class="m-wrap" required />
								<span class="help-inline"></span>

							</div>

						</div>

						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right" for="form-field-1">格式化：</label>
							<div class="controls">

								<input type="text" maxlength="200" name="seqFormat"
									value="${sysSequence.seqFormat}" class="m-wrap" required />
								<span class="help-inline"></span>

							</div>

						</div>

						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right" for="form-field-1">增量：</label>
							<div class="controls">

								<input type="text" maxlength="200" name="increment"
									value="${sysSequence.increment}" class="m-wrap" required /> <span
									class="help-inline"></span>

							</div>

						</div>

					
					
						<%-- <div class="form-group">
							<label class="col-sm-3 control-label no-padding-right" for="form-field-1">increment：</label>
							<div class="controls">

								<input type="text" maxlength="200" name="increment"
									value="${sysSequence.increment}" class="m-wrap" required /> <span
									class="help-inline"></span>

							</div>

						</div> --%>
						<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right" for="form-field-1">开始编号：</label>
							<div class="controls">
								<input type="text" maxlength="250" name="startNo"
									value="${sysSequence.startNo }" class="m-wrap" required /> <span
									class="help-inline"></span>

							</div>

						</div>
						
						
							<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right" for="form-field-1">当前编号：</label>
							<div class="controls">
								<input type="text" maxlength="250" name="currentNo"
									value="${sysSequence.currentNo }" class="m-wrap" required /> <span
									class="help-inline"></span>

							</div>

						</div>
						
						
							<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right" for="form-field-1">前缀：</label>
							<div class="controls">
								<input type="text" maxlength="250" name="prefix"
									value="${sysSequence.prefix }" class="m-wrap" required /> <span
									class="help-inline"></span>

							</div>

						</div>
						
						
							<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right" for="form-field-1">后缀：</label>
							<div class="controls">
								<input type="text" maxlength="250" name="suffix"
									value="${sysSequence.suffix }" class="m-wrap" required /> <span
									class="help-inline"></span>

							</div>

						</div>
						
						
							<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right" for="form-field-1">编码长度：</label>
							<div class="controls">
								<input type="text" maxlength="250" name="seqLength"
									value="${sysSequence.seqLength }" class="m-wrap" required /> <span
									class="help-inline"></span>

							</div>

						</div>
						
						
						<%-- 	<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right" for="form-field-1">currentDate：</label>
							<div class="controls">
								<input type="text" maxlength="250" name="currentDate"
									value="${sysSequence.currentDate }" class="m-wrap" required /> <span
									class="help-inline"></span>

							</div>

						</div>
						 --%>
						
							<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right" for="form-field-1">重复循环：</label>
							<div class="controls">
								<%-- <input type="text" maxlength="250" name="isCycle"
									value="${sysSequence.isCycle }" class="m-wrap" required /> <span
									class="help-inline"></span> --%>
									
									 <input type="radio"
									<c:if test="${sysSequence.isCycle ==1 || sysSequence.sysSequenceId==null}">checked="checked"</c:if>
									name="isCycle" value="1" /> <spring:message code="yes"></spring:message>

							
								<input type="radio" name="isCycle"
									<c:if test="${sysSequence.isCycle ==0 }">checked="checked"</c:if>
									value="0" /> <spring:message code="no"></spring:message>
									

							</div>

						</div>
						
							<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right" for="form-field-1">备注：</label>
							<div class="controls">
								<input type="text" maxlength="250" name="seqRemark"
									value="${sysSequence.seqRemark }" class="m-wrap" required /> <span
									class="help-inline"></span>

							</div>

						</div>
						
							<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right" for="form-field-1">是否重置：</label>
							<div class="controls">
								<%-- <input type="text" maxlength="250" name="isReset"
									value="${sysSequence.isReset }" class="m-wrap" required /> <span
									class="help-inline"></span> --%>
									
									 <input type="radio"
									<c:if test="${sysSequence.isReset ==1 || sysSequence.sysSequenceId==null}">checked="checked"</c:if>
									name="isReset" value="1" /> <spring:message code="yes"></spring:message>

							
								<input type="radio" name="isReset"
									<c:if test="${sysSequence.isReset ==0 }">checked="checked"</c:if>
									value="0" /> <spring:message code="no"></spring:message>

							</div>

						</div>

						<div class="form-actions center">

							<button type="submit" id="ok" class="btn btn-xs btn-primary">
								<spring:message code="btn.common.save"></spring:message>
							</button>
							<button type="button" onclick="backlist();" class="btn btn-xs btn-primary">
								<spring:message code="btn.common.back"></spring:message>
							</button>

						</div>

					</form>

				</div>
				</div>

			<!-- BEGIN PAGE CONTAINER-->



		</div>
		<!-- content end -->
		

</body>
</html>